package com.itheima.homework.String类;

import java.util.Scanner;

public class Demo1 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个Email地址:");
        String email = sc.next();
        if(email.contains("@")&&email.contains(".")){
            System.out.println("合法");
        }else{
            System.out.println("不合法的email地址");
        }
    }
}
